﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ThicknessLibrary;
using static System.Net.Mime.MediaTypeNames;

namespace TestConsoleApp
{
    internal class Program
    {
        static void Main(string[] args)
        {
            var cameras = KSJCamera.GetDeviceList();
            List<KSJCamera> cameraList = new List<KSJCamera>();
            foreach (var cam in cameras)
            {
                Console.WriteLine(cam);
                KSJCamera camera = new KSJCamera();
                camera.ConfigFile = Path.Combine(Environment.CurrentDirectory, $"{cam}.ini");
                camera.ConnectCamera(cam);
                camera.SetCaptureType(CAPTURE_TYPE.PROFILE);
                camera.CaptureImage();
                cameraList.Add(camera);
            }
            Console.ReadKey();
            foreach (var camera in cameraList)
            {
                camera.CloseCamera();
            }
        }
    }
}
